lib/pull: Collection and ref bindings verification
authorKrzesimir Nowak <krzesimir@kinvolk.io>
Thu, 22 Jun 2017 20:42:30 +0000 (22:42 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 6 Jul 2017 19:08:14 +0000 (19:08 +0000)
commitcc9a0386c46bbeca8f1ce80239eb00ad6d792de8
tree3b7dcd5c0f197a4ec32c41d8cd12f6e0fd2c1fc5
parentd91f6a0f6103fe6b2fcc24dd6fcf24a8aa22d633
lib/pull: Collection and ref bindings verification

This verifies the collection and ref bindings in the commit metadata
against the collection ID we have stored in the remote config and ref
we want to pull from. For the HEAD commits, we also check if the
checksum of the commit we just fetched agrees with the checksum we
really wanted to pull from the ref.

For commits with explicitly specified checksums and without specified
refs, we only verify if the commit has the bindings. We are able to
only verify the collection binding, though.

Closes: #972
Approved by: cgwalters
src/libostree/ostree-repo-pull.c